home *** CD-ROM | disk | FTP | other *** search
/ Treccani Italiana Di Scienze Lettere Ed Arti / [Enciclopedia] Treccani Italiana di scienze lettere ed arti.iso / pc / data / xxi_appendice_dvd.swf / scripts / __Packages / CAppendiceProspettiva.as < prev    next >
Text File  |  2007-11-08  |  3KB  |  98 lines

  1. class CAppendiceProspettiva extends Object
  2. {
  3.    function CAppendiceProspettiva(inBaseUrl)
  4.    {
  5.       super();
  6.       this.mBaseUrl = inBaseUrl;
  7.       this.mFrom = "";
  8.       this.Reset();
  9.    }
  10.    function NewProspettiva(id, tipo, titolo)
  11.    {
  12.       this.Reset();
  13.       this.mId = id;
  14.       this.mTipo = tipo;
  15.       this.mTitolo = StringUtils.HtmlFunction(titolo);
  16.    }
  17.    function InitFromResult(inContributoResult)
  18.    {
  19.       if(this.mId && inContributoResult.id != this.mId)
  20.       {
  21.       }
  22.       this.mId = inContributoResult.id;
  23.       this.mTipo = inContributoResult.tipo;
  24.       if(this.mTipo == undefined)
  25.       {
  26.          this.mTipo = inContributoResult._tipo;
  27.       }
  28.       this.mTitolo = StringUtils.HtmlFunction(inContributoResult.titolo);
  29.       this.mFile = inContributoResult.file;
  30.       this.mFileWithoutExt = StringUtils.StripExt(this.mFile);
  31.       this.mNumeroImmagini = inContributoResult.numeroImmagini;
  32.       this.mNumeroClip = inContributoResult.numeroClip;
  33.       this.mLemmiCorrelati = inContributoResult.lemmiCorrelati;
  34.       this.mImmagini = inContributoResult.immagini;
  35.       if(inContributoResult.immagini)
  36.       {
  37.          this.mNumeroImmagini = inContributoResult.immagini.length;
  38.       }
  39.    }
  40.    function GetPath()
  41.    {
  42.       var _loc2_ = "";
  43.       if(this.mFile != "")
  44.       {
  45.          _loc2_ = this.mBaseUrl + this.mFile;
  46.       }
  47.       return _loc2_;
  48.    }
  49.    function GetThumbPath()
  50.    {
  51.       var _loc3_ = "";
  52.       if(this.mFileWithoutExt != "")
  53.       {
  54.          _loc3_ = this.mBaseUrl + "preview" + _global.gPathSep + this.mFileWithoutExt + "_pw.jpg";
  55.       }
  56.       return _loc3_;
  57.    }
  58.    function GetImagePath(inNumber, inType)
  59.    {
  60.       if(inNumber < 0 || inNumber > this.mImmagini.length)
  61.       {
  62.          return "";
  63.       }
  64.       var _loc5_ = this.mImmagini[inNumber];
  65.       var _loc3_ = "image" + _global.gPathSep;
  66.       if(inType == "thumb")
  67.       {
  68.          _loc3_ = "thumb" + _global.gPathSep;
  69.       }
  70.       var _loc4_ = "";
  71.       if(this.mFileWithoutExt != "")
  72.       {
  73.          _loc4_ = this.mBaseUrl + _loc3_ + _loc5_.file;
  74.       }
  75.       return _loc4_;
  76.    }
  77.    function GetImageDida(inNumber)
  78.    {
  79.       if(inNumber < 0 || inNumber > this.mImmagini.length)
  80.       {
  81.          return "";
  82.       }
  83.       var _loc3_ = this.mImmagini[inNumber];
  84.       var _loc2_ = _loc3_.titolo;
  85.       return _loc2_;
  86.    }
  87.    function Reset()
  88.    {
  89.       this.mId = "";
  90.       this.mFile = "";
  91.       this.mDida = "";
  92.       this.mTitolo = "";
  93.       this.mNumeroClip = 0;
  94.       this.mNumeroImmagini = 0;
  95.       this.mLemmiCorrelati = new Array();
  96.    }
  97. }
  98.